//
// Created by liushuai on 2020/5/23.
//

#include "antTime.h"
#include <vector>
int min_time(int bright_length,std::vector<int>&result){
    int min_time = 0;
    for(auto e:result){
        int ans_min_time = std::min(e,bright_length-e);
        if(ans_min_time>min_time)
            min_time = ans_min_time;
    }
    return min_time;
}
int max_time(int bright_length,std::vector<int>&result){
    int max_time = 0;
    for(auto e:result){
        int ans_max_time = std::max(e,bright_length-e);
        if(ans_max_time>max_time)
            max_time = ans_max_time;
    }
    return max_time;
}